Sections of code, hardware and functionality are divided into modules, based upon the System Architecture. The divisons will sometimes be blurry, but just make the best assignments you can. This page should have a link to every function that is part of the project.
To improve code compatibility, please refer to the Programming Style Guide. Remember to communicate with people you will be working with.
Dont forget to use the 'function' template when uploading your code!
void serial_receive(void); -- Kit
void serial_transmit(void); -- Michael
void get_AD_value(void); -- Elisabeth
void keypad_press(void); -- Ryan
Mass Calculation
This mass calculation section seems a bit out of date. We have defined how our data will flow at: data_flow. This needs to be converted into actual functions - thinking about this may be one good task for the Wed lab. -Michael
For performing the tare and calibration, we are actually going to need a conversion function. However, particularly for the calibration, I believe it needs more accuracy than in int: I propose a float. The reason that the calibration in particular needs this accuracy is because we're going to have a y = mx + b equation, and m and b are going to need decimal points. - Duncan
There is another way that might be faster, but I will put it on the Discussion Page, not here. - Alex
float convert_unit(float mass, int inputUnit, int outputUnit) -- Duncan
float? calculate_mass(void) -- Alex, Duncan, Michelle
unsigned int* store_sample(unsigned int count, unsigned int Vss, unsigned int Vdd) -- Alex
Modules
Sections of code, hardware and functionality are divided into modules, based upon the System Architecture. The divisons will sometimes be blurry, but just make the best assignments you can. This page should have a link to every function that is part of the project.
To improve code compatibility, please refer to the Programming Style Guide. Remember to communicate with people you will be working with.
Dont forget to use the 'function' template when uploading your code!
Initialization and Startup
Preprocessor and global variables (#include, #define, #pragma code)void setup(void); -- Alex, Michael, Elisabeth, Ryan, Duncan, Michelle, Kit
+void initialise_AD_converter(void); -- Elisabeth, Michelle
int main(void); -- Alex
Interrupt Vectors
void high_ISR(void); -- Alex, Kit
void low_ISR(void); -- Alex, Kit
void serial_receive(void); -- Kit
void serial_transmit(void); -- Michael
void get_AD_value(void); -- Elisabeth
void keypad_press(void); -- Ryan
Mass Calculation
This mass calculation section seems a bit out of date. We have defined how our data will flow at: data_flow. This needs to be converted into actual functions - thinking about this may be one good task for the Wed lab. -MichaelFor performing the tare and calibration, we are actually going to need a conversion function. However, particularly for the calibration, I believe it needs more accuracy than in int: I propose a float. The reason that the calibration in particular needs this accuracy is because we're going to have a y = mx + b equation, and m and b are going to need decimal points. - Duncan
There is another way that might be faster, but I will put it on the Discussion Page, not here. - Alex
float convert_unit(float mass, int inputUnit, int outputUnit) -- Duncan
float? calculate_mass(void) -- Alex, Duncan, Michelle
unsigned int* store_sample(unsigned int count, unsigned int Vss, unsigned int Vdd) -- Alex
Operating States
char change_operating_state(void); -- Alex
char weigh_mode(void); --Duncan
char count_mode(void);
char tare_mode(void); -- Alex
char change_units(void);
char calibration_mode(void); -- Michael, Elisabeth, Alex
+void calibrate(unsigned int zeroVoltage, unsigned int secondVoltage, unsigned in secondMass, char massUnit) -- Duncan, Elisabeth, Michael
char show_statistics(void);
Utility Functions
struct Stream
+void push_string(Stream* stream, char* string);
++void push_char(Stream* stream, char);
+char pop_char(Stream* stream);
+char is_empty(Stream* stream);
char transmit(char* message); -- Michael
char display(char* message);
char speak(char* message);